<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <title>呼叫中心系统</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/non-responsive.css">
    <link rel="stylesheet" type="text/css" href="/css/global.css">
    <link rel="stylesheet" type="text/css" href="/css/task.css">
  </head>
  <body>
    <nav class="navbar navbar-default navbar-static-top">
      <div class="container">
        <div class="navbar-header">
          <a class="navbar-brand" href="#"><img alt="Logo" src="/img/logo.png"></a>
          <a class="navbar-brand" href="#">呼叫中心</a>
        </div>
        <div id="navbar">
          <ul class="nav navbar-nav">
            <li><a href="/status">状态监控</a></li>
            <li class="dropdown">
            <li class="active"><a href="/task">任务管理</a></li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">座席管理</a>
              <ul class="dropdown-menu">
                <li><a href="/user">座席管理</a></li>
                <li><a href="/exten">分机状态</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">项目管理</a>
              <ul class="dropdown-menu">
                <li><a href="/order">订单管理</a></li>
                <li class="disabled"><a href="#">客户资料管理</a></li>
                <li><a href="/product">商品管理</a></li>
                <li><a href="/sound">语音管理</a></li>
              </ul>
            </li>
            <li class="dropdown">
              <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">通话记录</a>
              <ul class="dropdown-menu">
                <li><a href="/cdr/query">通话记录查询</a></li>
                <li><a href="/cdr/report">通话数据报表</a></li>
              </ul>
            </li>
            <li><a href="/help">帮助文档</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right">
            <li><a><img class="img-circle icon" src="/img/<?php echo $user->icon; ?>.png" width="19" height="19"> <?php echo mb_substr($user->name, 0, 8, 'utf-8') ?></a></li>
            <li><a id="account" href="/account">我的账户</a></li>
            <li><a href="/logout"><span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> 退 出</a></li>
          </ul>
        </div>
      </div>
    </nav>
    <div class="container box">
      <div>
        <ol class="breadcrumb">
          <li class="active">当前位置:</li>
          <li><a href="/task.php">任务管理</a></li>
          <li class="active">创建新任务</li>
        </ol>
      </div>
      <div>
        <form class="form-horizontal" action="/task/create" method="post" enctype="multipart/form-data">
          <div class="form-group">
            <label class="control-label col-sm-4">任务名称: </label>
            <div class="col-sm-3">
              <input type="text" class="form-control input-sm" style="font-weight:bold" name="name" placeholder="请输入任务名称" required>
            </div>
            <div class="col-sm-3">
              <p class="help-block">指定任务名称</p>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-sm-4">任务类型: </label>
            <div class="col-sm-3">
              <select class="form-control input-sm" name="type" onChange="javascript:test('mune_x'+this.value)">
                <option value="1">群呼转座席(自动模式)</option>
                <option value="2">群呼转座席(固定模式)</option>
                <option value="3">手动批量外呼</option>
                <option value="4" disabled>语音群呼广告</option>
              </select>
            </div>
            <div class="col-sm-3">
              <p class="help-block">指定任务类型</p>
            </div>
          </div>
          <div class="form-group">
            <label class="col-sm-4 control-label">资源文件: </label>
            <div class="col-sm-3">
              <input type="file" class="form-control input-sm" name="file" accept="text/plain" placeholder="请输选择文件" required>
            </div>
            <div class="col-sm-3">
              <p class="help-block">资源文件为 txt 的文本文件</p>
            </div>
          </div>
          <!-- 群呼转座席(自动模式) -->
          <div id="x1">
            <div class="form-group">
              <label class="control-label col-sm-4">业务模板: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="business1">
                  <option value="1">订单模板</option>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">选择业务弹屏模板</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">拨号比例: </label>
              <div class="col-sm-3">
                <input type="number" class="form-control input-sm" style="font-weight:bold" name="dial1" value="8" min="1" max="24" placeholder="请输入拨号比例" required>
              </div>
              <div class="col-sm-3">
                <p class="help-block">设置默认拨号比例</p>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-4">语音设置: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="sound1">
                  <option class="text-danger"value="0">====== 不使用语音 =====</option>
                  <?php
                  if (is_array($sounds) && count($sounds) > 0) {
                    foreach ($sounds as $sound) {
                      echo '<option value="',$sound['id'],'">',$sound['name'],'</option>',"\n";
                    }
                  }
                  ?>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">指定任务语音</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">数据过滤服务: </label>
              <div class="checkbox col-sm-3">
                <label>
                  <input type="checkbox" name="empty1"> 空号过滤 <img src="/img/new.png" style="height:24px" title="新功能上线">
                </label>
              </div>
              <div class="col-sm-3">
                <p class="help-block">号码数据过滤，可提高客户接通率</p>
              </div>
            </div>
          </div>
          <!-- 群呼转座席(自动模式) -->
          <!-- 群呼转座席(固定模式) -->
          <div id="x2" style="display:none">
            <div class="form-group">
              <label class="control-label col-sm-4">业务模板: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="business2">
                  <option value="1">订单模板</option>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">选择业务弹屏模板</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">固定并发: </label>
              <div class="col-sm-3">
                <input type="number" class="form-control input-sm" style="font-weight:bold" name="dial2" value="80" min="1" placeholder="请输入固定并发数" required>
              </div>
              <div class="col-sm-3">
                <p class="help-block">设置默认拨号固定并发数</p>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-sm-4">语音设置: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="sound2">
                  <option class="text-danger" value="0">====== 不使用语音 =====</option>
                  <?php
                  if (is_array($sounds) && count($sounds) > 0) {
                    foreach ($sounds as $sound) {
                      echo '<option value="',$sound['id'],'">',$sound['name'],'</option>',"\n";
                    }
                  }
                  ?>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">指定任务语音</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">数据过滤服务: </label>
              <div class="checkbox col-sm-3">
                <label>
                  <input type="checkbox" name="empty2"> 空号过滤 <img src="/img/new.png" style="height:24px" title="新功能上线">
                </label>
              </div>
              <div class="col-sm-3">
                <p class="help-block">号码数据过滤，可提高客户接通率</p>
              </div>
            </div>
          </div>
          <!-- 群呼转座席(固定模式) -->
          <!-- 手动批量外呼 -->
          <div id="x3" style="display:none">
            <div class="form-group">
              <label class="control-label col-sm-4">业务模板: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="business3">
                  <option value="1">订单模板</option>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">选择业务弹屏模板</p>
              </div>
            </div>
          </div>
          <!-- 手动批量外呼 -->
          <!-- 语音群呼广告 -->
          <div id="x4" style="display:none">
            <div class="form-group">
              <label class="control-label col-sm-4">语音设置: </label>
              <div class="col-sm-3">
                <select class="form-control input-sm" name="sound4">
                  <option class="text-danger" value="0">====== 不使用语音 =====</option>
                  <?php
                  if (is_array($sounds) && count($sounds) > 0) {
                    foreach ($sounds as $sound) {
                      echo '<option value="',$sound['id'],'">',$sound['name'],'</option>',"\n";
                    }
                  }
                  ?>
                </select>
              </div>
              <div class="col-sm-3">
                <p class="help-block">指定任务语音</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">按键设置: </label>
              <div class="checkbox col-sm-3">
                <label>
                  <input type="checkbox" name="presskey"> 开启按键提取
                </label>
              </div>
              <div class="col-sm-3">
                <p class="help-block">如果需要获取按键按选择此项</p>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-4 control-label">数据过滤服务: </label>
              <div class="checkbox col-sm-3">
                <label>
                  <input type="checkbox" name="empty3"> 空号过滤 <img src="/img/new.png" style="height:24px" title="新功能上线">
                </label>
              </div>
              <div class="col-sm-3">
                <p class="help-block">号码数据过滤，可提高客户接通率</p>
              </div>
            </div>
          </div>
          <!-- 语音群呼广告 -->
          <div class="form-group">
            <div class="col-sm-3 col-sm-offset-4">
              <button id="submit" type="submit" class="btn btn-success" style="width:80px">创建任务</button>
              <a class="btn btn-default" style="margin-left:30px;width:80px" href="/task">取 消</a>
            </div>
          </div>
        </form>
      </div>
    </div>
    <script type="text/javascript" src="/js/jquery.min.js"></script>
    <script type="text/javascript" src="/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="/js/layer.js"></script>
    <script type="text/javascript" src="/js/task.js"></script>
    <script type="text/javascript">
      $('li.dropdown').mouseover(function() {   
        $(this).addClass('open');
      }).mouseout(function() {
        $(this).removeClass('open');
      });

      $("#submit").click(function(){
      var index = layer.load(2, {shade: [0.7,'#fff'], time: 8000});
      });
    </script>
  </body>
</html>
